package cn.zzq.aix.nativeinterface.javareflector.parser;

public class MethodPatternTextParser extends PatternTextParser {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String methodName = "";
	private String className = "";

	public MethodPatternTextParser(String patternText) {
		super(patternText);
		String[] keywords=getKey().split("[.]");
		
		this.methodName=keywords[keywords.length-1];
		if(keywords.length>1) {
			StringBuffer sb=new StringBuffer();
			for (int i = 0; i < keywords.length-1; i++) {
				sb.append(keywords[i]+'.');
			}
			sb.deleteCharAt(sb.length()-1);
			this.className=sb.toString();
		}else {
			this.className="";
		}
		
	}
	public String getClassName() {
		return className;
	}

	public String getMethodName() {
		return methodName;
	}

}
